package com.ruoyi.system.domain;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import javax.validation.constraints.NotBlank;

/**
 * 租户子系统中间对象 sys_tenant_application
 * 
 * @author kuaidou
 * @date 2021-08-23
 */
public class SysTenantApplication extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 租户编码 */
    private String tenantCode;

    /** 子系统编码 */
    private String appCode;

    /** 到期时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "到期时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date expirationTime;

    /**  系统列表(不库存) */
    @NotBlank(message = "系统不能为空")
    private List<String> appCodes;

    /** 到期时间列表(不库存) */
    private List<Date> expirationTimes;

    /** 系统到期时间列表(不库存) */
    private Map<String, Date> appCodeMaps;

    /** 租户类型(不库存) */
    private String type;

    public void setTenantCode(String tenantCode) 
    {
        this.tenantCode = tenantCode;
    }

    public String getTenantCode() 
    {
        return tenantCode;
    }
    public void setAppCode(String appCode) 
    {
        this.appCode = appCode;
    }

    public String getAppCode() 
    {
        return appCode;
    }
    public void setExpirationTime(Date expirationTime) 
    {
        this.expirationTime = expirationTime;
    }

    public Date getExpirationTime() 
    {
        return expirationTime;
    }

    public List<String> getAppCodes() {
        return appCodes;
    }

    public void setAppCodes(List<String> appCodes) {
        this.appCodes = appCodes;
    }

    public List<Date> getExpirationTimes() {
        return expirationTimes;
    }

    public void setExpirationTimes(List<Date> expirationTimes) {
        this.expirationTimes = expirationTimes;
    }

    public Map<String, Date> getAppCodeMaps() {
        return appCodeMaps;
    }

    public void setAppCodeMaps(Map<String, Date> appCodeMaps) {
        this.appCodeMaps = appCodeMaps;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("tenantCode", getTenantCode())
            .append("appCode", getAppCode())
            .append("expirationTime", getExpirationTime())
            .toString();
    }
}
